dnd 5e – Using a familiar to deliver a touch attack with the Ready action

The last paragraph of the Find Familiar spell contains the following:

…when you cast a spell with a range of touch, your familiar can
deliver the spell as if it had cast the spell. Your familiar must be
within 100 feet of you, and it must use its reaction to deliver the
spell when you cast it.

Since the attack functions as a reaction for the familiar, it must already be within touch range of the target to deliver the spell, correct?

If a target is 30ft away, could a wizard ready a Shocking Grasp spell for “when my familiar is within touch range of that bugbear”, allowing his owl to fly over, deliver the spell attack, and then fly away on its turn?

I assume his owl could not ready an action to fly to a goblin and back triggered upon “the wizard casts shocking grasp” since both would require a reaction, correct?

javascript – Firefox fires pointerup event on touch and hold, unlike Chrome

I’m making a game and I just want to know when the pointer or finger is down/up. I listen to pointerdown and pointerup (or touchstart and touchend) which works as expected on windows chrome/android chrome/ios/mac, but on Firefox Android (or Firefox Windows when you simulate touch in the console).

In Firefox, if you touch and hold for a second without releasing, an unwanted pointerup event is fired that I can’t differentiate from a real touch and release. Why is such a basic spec not implemented the same way and how can I prevent or work around this behaviour in Firefox?

https://jsfiddle.net/cxbq08ep/1/

window.addEventListener('pointerdown', e => console.log('pointerdown', e));
window.addEventListener('pointerup', e => console.log('pointerup', e));
window.addEventListener('contextmenu', e => e.preventDefault());

(same behaviour for touch events)

Find Familiar to deliver a Touch Spell

Find Familiar to deliver a Touch Spell – Role-playing Games Stack Exchange

authentication – Are security keys with touch requirements more secure than those without?

My friends and I have worked at various tech companies which required us to use a security key in order to login to our computers. Some of us had to physically “touch” the device to login, while some of us at other companies did not need to touch our key.

Does the addition of having to touch the security key add any additional security? If so, how? If not, what is the purpose of it?

graphics – Libgdx and Box2D with android studio: Why isn’t the ball responding to touch inputs?

public class MyGdxGame extends ApplicationAdapter {

    private boolean DEBUG = false;

    //private OrthographicCamera camera;
    private Camera camera;



    private Box2DDebugRenderer debugRenderer;
    private World world;
    //private Body player;

    private Body BallBody;
    private Body floorBody;

    private SpriteBatch batch;
    private Texture BallTexture;
    private Sprite BallSprite;

    private BodyDef BallDef;
    private BodyDef floorDef;

    private CircleShape BallShape;

    private FixtureDef BallFixDeff;
    private FixtureDef FloorFixDeff;
    private EdgeShape FloorEdgeShape;

    private float w;
    private float h;

    GameScreen gameScreen;
    private float torque;
    private boolean drawBall;


    @Override
    public void create () {

        batch = new SpriteBatch();
        BallTexture = new Texture("ball.png");
        BallSprite = new Sprite(BallTexture);

        BallSprite.setPosition(-BallSprite.getWidth() / 2,
                -BallSprite.getHeight() / 2);
        world = new World(new Vector2(0, -10f), true);

        BallDef = new BodyDef();
        BallDef.type = BodyDef.BodyType.DynamicBody;
        BallDef.position.set((BallSprite.getX() + BallSprite.getWidth()/2)/32, (BallSprite.getY() + BallSprite.getHeight()/2)/32);

        BallBody = world.createBody(BallDef);


        BallShape = new CircleShape();
        BallShape.setRadius(3f);

        BallFixDeff = new FixtureDef();
        BallFixDeff.shape = BallShape;
        BallFixDeff.density = 2.5f;
        BallFixDeff.friction = 3f;
        BallFixDeff.restitution = .75f;

        BallBody.createFixture(BallFixDeff);
        BallShape.dispose();

        floorDef = new BodyDef();
        floorDef.type = BodyDef.BodyType.StaticBody;
        float w = Gdx.graphics.getWidth()/30;
        float h = Gdx.graphics.getHeight()/30 - 50/30;
        floorDef.position.set(0, 0);

        FloorFixDeff = new FixtureDef();
        FloorEdgeShape = new EdgeShape();
        FloorEdgeShape.set(-w / 2, -h / 2, w / 2, -h / 2);
        FloorFixDeff.shape = FloorEdgeShape;

        floorBody = world.createBody(floorDef);
        floorBody.createFixture(FloorFixDeff);
        FloorEdgeShape.dispose();

        //Gdx.input.setInputProcessor(this);

        debugRenderer = new Box2DDebugRenderer();

        camera = new OrthographicCamera(Gdx.graphics.getWidth(),
                Gdx.graphics.getHeight());

        Gdx.input.setInputProcessor(new PlayerControl(camera, BallBody));
        

    }

    @Override
    public void render() {

        camera.update();

        world.step(1f / 60f, 6, 2);


        //float torque;
        BallBody.applyTorque(torque,true);

        BallSprite.setPosition(
                (BallBody.getPosition().x * 32) - BallSprite.getWidth()
                        / 2,
                (BallBody.getPosition().y * 32) - BallSprite.getHeight()
                        / 2);

        BallSprite.setRotation((float)Math.toDegrees(BallBody.getAngle()));

        Gdx.gl.glClearColor(1, 1, 1, 1);
        Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);

        batch.setProjectionMatrix(camera.combined);
        Matrix4 debugMatrix = batch.getProjectionMatrix().cpy().scale(32,
                32, 0);

        batch.begin();

        //if(drawBall)
            batch.draw(BallSprite, BallSprite.getX(), BallSprite.getY(), BallSprite.getOriginX(), BallSprite.getOriginY(), BallSprite.getWidth(), BallSprite.getHeight(), BallSprite.getScaleX()/3, BallSprite.getScaleY()/3, BallSprite.getRotation());
        batch.end();
        debugRenderer.render(world, debugMatrix);

    }


    @Override
    public void resize(int width, int height) {

    }

    //public class Player {
        //private Body b;

        public boolean isPointOnPlayer(float x, float y){
            for(Fixture fixture : BallBody.getFixtureList())
                if(fixture.testPoint(x, y)) return true;
            return false;
        }
    //}



    @Override
    public void dispose() {

        BallTexture.dispose();
        world.dispose();


    }


    public void update(float delta) {

    }

    public void inputUpdate(float delta) {

    }

    public void cameraUpdate(float delta) {

    }

    //@Override
    public class PlayerControl extends InputAdapter {
        //private final Camera _camera;
        //private final Player _player;
        private Vector3 _touchPosition;

        public PlayerControl(Camera camera, Body ballBody) {
            //_camera = camera;
            //_player = player;
            // create buffer vector to make garbage collector happy
            _touchPosition = new Vector3();
        }

        @Override
        public boolean touchDown(int screenX, int screenY, int pointer, int button) {
            // don't forget to unproject screen coordinates to game world


            camera.unproject(_touchPosition.set(screenX, screenY, 0F));
            if (isPointOnPlayer(_touchPosition.x, _touchPosition.y)) {
                // touch on the player body. Do some stuff like player jumping
                BallBody.applyForce(new Vector2(0, 100f),new Vector2(0, 10f),true);


                return true;

            } else
                return super.touchDown(screenX, screenY, pointer, button);
        }


    }



}

dnd 5e – Does the Fire Elementa’s Touch attack’s ongoing damage stack with itself?

No they do not stack

The errata to the Dungeon Masters Guide states (emphasis mine):

Different game features can affect a target at the same time. But when two or more game features have the same name, only the effects of one of them—the most potent one—apply while the durations of the effects overlap. For example, if a target is ignited by a fire elemental’s Fire Form trait, the ongoing fire damage doesn’t increase if the burning target is subjected to that trait again. Game features include spells, class features, feats, racial traits, monster abilities, and magic items. See the related rule in the “Combining Magical Effects” section of chapter 10 in the Player’s Handbook.

The trait talked about there states:

(…) until someone takes an action to douse the fire, the creature takes 5 (1d10) fire damage at the start of each of its turns (…)

And the Touch attack states:

(…) Until a creature takes an action to douse the fire, the target takes 5 (1d10) fire damage at the start of each of its turns (…)

These are almost identically worded and as the first does not stack with itself we can conclude that the second also does not. This can also be concluded from the fact that the features share the same name, that name being the Touch attack of a Fire Elemental. As such, while the durations of those features would overlap, only one takes effect.


Both effects would be there though

Note that the rules do not say that while the durations overlap one of the effects just vanishes, instead, it simply becomes inactive while those durations overlap. But what happens when you try to end the effect of such a condition? We actually have an entire question on this (full disclosure: I asked it):

dnd 5e – Do the Fire Elemental’s Fire Form trait’s and Touch attack’s ongoing fire damage stack with each other?

They do technically stack, but a GM can always rule otherwise

Yes, the effects do have different names, and as such, the rules on stacking effects do not apply to these features. Thus a Fire Elemental could enter a creature’s space, catching them on fire and causing them to take 1d10 fire damage at the start of their turns and then perform a Touch attack, igniting them again and causing them to take another, separate 1d10 fire damage at the start of their turns.

That is what the rules seem to lay out; however, you may not think this makes perfect sense. After all, the creature was lit on fire twice and a GM could certainly argue that this simply cannot happen and thus the second effect cannot actually occur, but that would be their own ruling. Furthermore, if a GM said that they did stack, they would want to determine how one can go about dousing the fires; does it require one action or two?

spellcasting – If my character has the Familiar Conduit feat, how do I calculate the success or failure of a touch spell that uses the familiar?

Some Touch spells always ‘hit’

The range of touch has been altered since the rules from Pathfinder 1st edition.

A spell with a range of touch requires you to physically touch the target. You use your unarmed reach to determine whether you can touch the creature. You can usually touch the target automatically, though the spell might specify that the target can attempt a saving throw or that you must attempt a spell attack roll. If an ability increases the range of a touch spell, start at 0 feet and increase from there.

So for many touch spells, as long as your Familiar can reach the target (usually being in the same space for Tiny creatures), they are affected by the spell.

Otherwise, you would use your own statistics

The Familiar Conduit spell only alters the origin point for the magic. You are the one performing the spellcasting, so you use your own statistics for all purposes, including spell attack rolls.

feats – How to calculate the delivery of a touch spell using the familiar?

Some Touch spells always ‘hit’

The range of touch has been altered since the rules from Pathfinder 1st edition.

A spell with a range of touch requires you to physically touch the target. You use your unarmed reach to determine whether you can touch the creature. You can usually touch the target automatically, though the spell might specify that the target can attempt a saving throw or that you must attempt a spell attack roll. If an ability increases the range of a touch spell, start at 0 feet and increase from there.

So for many touch spells, as long as your Familiar can reach the target (usually being in the same space for Tiny creatures), they are affected by the spell.

Otherwise, you would use your own statistics

The Familiar Conduit spell only alters the origin point for the magic. You are the one performing the spellcasting, so you use your own statistics for all purposes, including spell attack rolls.

Detect long presses in ViewGroup WITHOUT intercepting the touch events

I’d like to have following behaviour inside my ViewGroup:

  • don’t intercept events at all
  • intercept as soon as we detected a long press
  • only intercept if no child has detected a long press yet

I would think that if a child returns true on its OnLongClickListener that this would result in a `requestDisallowInterceptTouchEvent´ that’s being hand on the view hierarchy upwards, but this is not happening…

Any ideas how I would implement this correctly?

My solution so far

class InterceptTouchFrameLayout @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0,
    defStyleRes: Int = 0
) : FrameLayout(context, attrs, defStyleAttr, defStyleRes) {

    var onEventListener: ((event: Event, location: Point) -> Unit)? = null
    var longPressDown: DownEvent? = null
    var longPressEventHandled: Boolean = false
    var longPressRunnable = Runnable {
        longPressDown?.let { onEventListener?.invoke(Event.LongPress, it.getPoint()) }
        longPressEventHandled = true
        L.d { "Long Press Event" }
    }

    // -----------------
    // Touch Events
    // -----------------

    /*
    * This method JUST determines whether we want to intercept the motion.
    * If we return true, onTouchEvent will be called and we do the actual
    * event handling there.
    */
    override fun onInterceptTouchEvent(ev: MotionEvent): Boolean {
        val intercept: Boolean // true if we want to intercept the touch event

        if (longPressEventHandled) {
            // the long press event has already been send out so we intercept - no child view needs to handle this event anymore!
            intercept = true
        } else {

            when (ev.actionMasked) {
                // Always handle the case of the touch gesture being complete.
                MotionEvent.ACTION_CANCEL,
                MotionEvent.ACTION_UP -> {
                    cancelLongPressDelayed()
                    intercept = false
                }
                MotionEvent.ACTION_DOWN -> {
                    startLongPressDelayed(ev)
                    intercept = false
                }
                MotionEvent.ACTION_MOVE -> {
                    val inValidDistance = longPressDown?.inClickDistance(ev, touchSlop) ?: false
                    // if we are not in a valid long press distance we cancel the long press
                    if (!inValidDistance) {
                        cancelLongPressDelayed()
                    }
                    intercept = false
                }

                else -> {
                    // In general, we don't want to intercept touch events. They should be
                    // handled by the child view.
                    intercept = false
                }
            }
        }
        L.d { "Intercept: ${ev.actionMasked} | $intercept | $longPressEventHandled" }
        return intercept
    }

    /* Here we actually handle the touch event
     * This method will only be called if the touch event was intercepted in
     * onInterceptTouchEvent
     */
    override fun onTouchEvent(ev: MotionEvent): Boolean {
        // we only intercept the touch event if we have detected a long press - otherwise we always forward the touch events to the children
        // => this function should NEVER be called when longPressEventHandled == false!
        L.d { "ev = ${ev.actionMasked} | longPressEventHandled = $longPressEventHandled" }

        val handled: Boolean
        when (ev.actionMasked) {
            // Always handle the case of the touch gesture being complete.
            MotionEvent.ACTION_CANCEL,
            MotionEvent.ACTION_UP -> {
                cancelLongPressDelayed()
                handled = true
            }
            else -> {
                handled = false
            }
        }
        return handled
    }

    override fun requestDisallowInterceptTouchEvent(disallowIntercept: Boolean) {
        super.requestDisallowInterceptTouchEvent(disallowIntercept)
        L.d { "disallowIntercept = $disallowIntercept" }
    }

    // -----------------
    // functions
    // -----------------

    private fun startLongPressDelayed(ev: MotionEvent) {
        longPressEventHandled = false
        longPressDown = DownEvent(ev.x.toInt(), ev.y.toInt())
        handler.postDelayed(
            longPressRunnable,
            (longPressTimeout.toFloat() * 2f).toLong() // we add a little bit to the timeout so that childrens long press handlers fire before us
        )
    }

    private fun cancelLongPressDelayed() {
        handler.removeCallbacks(longPressRunnable)
        longPressEventHandled = false
        longPressDown = null
    }

    // -----------------
    // classes / constants
    // -----------------

    private val touchSlop: Int = ViewConfiguration.get(context).scaledTouchSlop
    private val longPressTimeout = ViewConfiguration.getLongPressTimeout().toLong()

    class DownEvent(val x: Int, val y: Int) {
        fun inClickDistance(ev: MotionEvent, touchSlop: Int): Boolean {
            val distX = abs(ev.x.toInt() - x)
            val distY = abs(ev.y.toInt() - y)
            return distX <= touchSlop && distY <= touchSlop
        }

        fun getPoint() = Point(x, y)
    }

    enum class Event {
        LongPress
    }
}

Problem with my solution

I do have a items with LongClickListeners inside my ViewGroup– those items do return true inside their listeners but that’s not helping. I don’t know how I can detect if a child was handling the long press as well – in this case my view group should cancel it’s long press handling immediately…

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive Proxies-free.com New Proxy Lists Every Day Proxies123